package com.jzt.gateway.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jzt.gateway.entity.UnionUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * 作者：lizw <br/>
 * 创建时间：2020/06/28 16:08 <br/>
 */
@Repository
@Mapper
public interface UnionUserDao extends BaseMapper<UnionUser> {

    @Select("select * from union_user where one_id=#{oneId} limit 1")
    UnionUser getByOneId(@Param("oneId") String oneId);

    @Select("select * from union_user where telephone=#{telephone} limit 1")
    UnionUser getByTelephone(@Param("telephone") String telephone);

    @Select("select * from union_user where email=#{email} limit 1")
    UnionUser getByEmail(@Param("email") String email);
}
